/**
 * 管理员词库管理相关 API
 * @author 韩睿倩
 */
import request from '@/utils/request'

//查找单词
export function getWordAdmin(wordSpell) {
    return request({
        method: 'get',
        url: '/admin/words/' + wordSpell
    })
}

//查看单词详情
export function getWordDetailAdmin(wordId) {
    return request({
        method: 'get',
        url: '/admin/words/word/' + wordId
    })
}

//修改单词详情
export function updateWordInfo(wordId, data) {
    return request({
        method: 'put',
        headers: {
            isToken: true
        },
        url: '/admin/words/' + wordId,
        data: data
    })
}

//删除单词
export function deleteWord(wordId, data) {
    return request({
        method: 'delete',
        url: '/admin/words/' + wordId,
        data: data
    })
}

//添加单词
export function addWord(data) {
    return request({
        method: 'post',
        url: '/admin/words',
        data: data
    })
}
